﻿''' <summary>
''' 锐剑系统 凭证类别库
''' 对应表- 凭证类别库
''' </summary>
Public Class RjClsVoucherTypeDbAccess
    Inherits ClsBaseDbAccess

    Public Sub New(ByVal s As String)
        MyBase.New(s, TABLE_NAME_RJ_VOUCHER_TYPE)
    End Sub

    Public Sub New(ByVal s As String, ByVal n As String)
        MyBase.New(s, n)
    End Sub

    Public Overrides Function ConvertRecordToClass(reader As OleDb.OleDbDataReader) As Object

        If reader Is Nothing Then
            Return Nothing
        End If

        Try

            Dim tmpList As List(Of RjClsVoucherType) = New List(Of RjClsVoucherType)
            Dim tmpCls As RjClsVoucherType

            While reader.Read()

                tmpCls = New RjClsVoucherType()

                With tmpCls
                    .TypeId = ConvertDbNullString(reader(0))
                    .VoucherGroup = ConvertDbNullString(reader(1))
                    .GroupShortName = ConvertDbNullString(reader(2))
                End With

                tmpList.Add(tmpCls)

            End While

            Return tmpList

        Catch ex As Exception

            mErrorNumber = -1001
            mErrorMessage = ex.Message
            mErrorCreater = "ClsTVoucherGroupDbAccess - ConvertRecordToClass"

            Return Nothing
        End Try

    End Function
End Class
